import cn.cvs.pojo.SysUser;
import cn.cvs.service.SysUserService;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.text.ParseException;

public class test {
    public void testAddUser() throws ParseException{
         Logger logger = Logger.getLogger(test.class);
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        SysUserService userService = (SysUserService) ctx.getBean("sysUserService");
        SysUser user = new SysUser();
        boolean result = userService.add(user);

        logger.debug("testAdd result : " + result);
    }
}
